package com.example.mobileeducationtv;

import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class MessageDatabase extends Activity{
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.messages_database);
		
		DatabaseHelper db = new DatabaseHelper(this);
		db.addMessage(new Messages("+97294202", "Hello World, this is my message"));
		List<Messages> messagesList = db.getAllMessages();
		
		for(Messages message : messagesList) {
			//appendMessage(message.getMessage(), message.getSender());
			String log = "Name " + message.getSender() + "Message " + message.getMessage();
			Log.d("Message Test", log);
		}
	}
}
